package com.lsh.oms.core.enums;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @author peter
 * @date 17/7/21
 */
public enum Zone {

    /**
     *
     */
    BEIJING1("1000","北京"),

    BEIJING_XFD1("2000","北京新发地"),

    BEIJING_KA1("3000","北京KA"),

    TIANJING1("1001","天津"),

    HANGZOUH1("1002","杭州"),

    CHENGDU1("5000", "北京KA");

    private String zoneCode;

    private String zoneName;

    private static Map<String,Zone> map = new HashMap<>(8);
    static {
        for(Zone zone : Zone.values()){
            map.put(zone.getZoneCode(),zone);
        }
    }

    Zone(String zoneCode, String zoneName) {
        this.zoneCode = zoneCode;
        this.zoneName = zoneName;
    }

    public String getZoneCode() {
        return zoneCode;
    }

    public String getZoneName() {
        return zoneName;
    }

    public static Zone parse(String zoneCode){
        return map.get(zoneCode);
    }
}
